home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / dopus412-gpl / program / remember.c < prev    next >
C/C++ Source or Header  |  2000-02-28  |  5KB  |  139 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. #include "dopus.h"
  32.  
  33. void do_remember_config(data)
  34. struct RememberData *data;
  35. {
  36.     int a;
  37.  
  38.     data->copyflags=config->copyflags;
  39.     data->deleteflags=config->deleteflags;
  40.     data->errorflags=config->errorflags;
  41.     CopyMem(config->displaypos,data->displaypos,32);
  42.     data->generalflags=config->generalflags;
  43.     data->iconflags=config->iconflags;
  44.     data->existflags=config->existflags;
  45.     data->sortflags=config->sortflags;
  46.     data->dynamicflags=config->dynamicflags;
  47.     strcpy(data->outputcmd,config->outputcmd);
  48.     strcpy(data->output,config->output);
  49.     data->scrdepth=config->scrdepth;
  50.     data->screenflags=config->screenflags;
  51.     data->screenmode=config->screenmode;
  52.     data->scrw=config->scrw;
  53.     data->scrh=config->scrh;
  54.     data->dirflags=config->dirflags;
  55.     strcpy(data->defaulttool,config->defaulttool);
  56.     data->showdelay=config->showdelay;
  57.     data->viewbits=config->viewbits;
  58.     data->fadetime=config->fadetime;
  59.     data->hiddenbit=config->hiddenbit;
  60.     strcpy(data->showpat,config->showpat);
  61.     strcpy(data->hidepat,config->hidepat);
  62.     data->icontype=config->icontype;
  63.     data->scrclktype=config->scrclktype;
  64.     data->showfree=config->showfree;
  65.     for (a=0;a<NUMFONTS;a++) {
  66.         data->fontsizes[a]=config->fontsizes[a];
  67.         strcpy(data->fontbufs[a],config->fontbufs[a]);
  68.     }
  69.     data->dateformat=config->dateformat;
  70.     data->gadgetrows=config->gadgetrows;
  71.     CopyMem(config->displaylength,data->displaylength,32);
  72.     data->windowdelta=config->windowdelta;
  73.     for (a=0;a<2;a++) {
  74.         data->sortmethod[a]=config->sortmethod[a];
  75.         data->separatemethod[a]=config->separatemethod[a];
  76.     }
  77.     data->wbwinx=config->wbwinx;
  78.     data->wbwiny=config->wbwiny;
  79.     data->scr_winw=config->scr_winw;
  80.     data->scr_winh=config->scr_winh;
  81.     strcpy(data->pubscreen_name,config->pubscreen_name);
  82.     strcpy(data->portname,str_arexx_portname);
  83. }
  84.  
  85. void do_restore_config(data)
  86. struct RememberData *data;
  87. {
  88.     int a;
  89.  
  90.     config->copyflags=data->copyflags;
  91.     config->deleteflags=data->deleteflags;
  92.     config->errorflags=data->errorflags;
  93.     CopyMem(data->displaypos,config->displaypos,32);
  94.     config->generalflags=data->generalflags;
  95.     config->iconflags=data->iconflags;
  96.     config->existflags=data->existflags;
  97.     config->sortflags=data->sortflags;
  98.     config->dynamicflags=data->dynamicflags;
  99.     strcpy(config->outputcmd,data->outputcmd);
  100.     strcpy(config->output,data->output);
  101.     config->scrdepth=data->scrdepth;
  102.     config->screenflags=data->screenflags;
  103.     config->screenmode=data->screenmode;
  104.     config->scrw=data->scrw;
  105.     config->scrh=data->scrh;
  106.     config->dirflags=data->dirflags;
  107.     strcpy(config->defaulttool,data->defaulttool);
  108.     config->showdelay=data->showdelay;
  109.     config->viewbits=data->viewbits;
  110.     config->fadetime=data->fadetime;
  111.     config->hiddenbit=data->hiddenbit;
  112.     strcpy(config->showpat,data->showpat);
  113.     strcpy(config->hidepat,data->hidepat);
  114.     config->icontype=data->icontype;
  115.     config->scrclktype=data->scrclktype;
  116.     config->showfree=data->showfree;
  117.     for (a=0;a<NUMFONTS;a++) {
  118.         config->fontsizes[a]=data->fontsizes[a];
  119.         strcpy(config->fontbufs[a],data->fontbufs[a]);
  120.     }
  121.     config->dateformat=data->dateformat;
  122.     config->gadgetrows=data->gadgetrows;
  123.     CopyMem(data->displaylength,config->displaylength,32);
  124.     for (a=0;a<2;a++) {
  125.         config->sortmethod[a]=data->sortmethod[a];
  126.         config->separatemethod[a]=data->separatemethod[a];
  127.     }
  128.  
  129.     LParsePatternI(config->showpat,config->showpatparsed);
  130.     LParsePatternI(config->hidepat,config->hidepatparsed);
  131.     dosizedirwindows(data->windowdelta);
  132.     config->wbwinx=data->wbwinx;
  133.     config->wbwiny=data->wbwiny;
  134.     config->scr_winw=data->scr_winw;
  135.     config->scr_winh=data->scr_winh;
  136.     strcpy(config->pubscreen_name,data->pubscreen_name);
  137.     change_port_name(data->portname);
  138. }
  139.